package com.dlc.shop.user.common.enums;

import java.util.Objects;

/**
 * 推送用户类型 0.所有用户 1.免费会员 2.付费会员 3.店铺客户 4.店铺会员
 * @author TRACK
 */
public enum PopupUserTypeEnum {

    /**
     * 所有用户
     */
    ALL_USER(0),

    /**
     * 免费会员
     */
    FREE_USER(1),

    /**
     * 付费会员
     */
    PAY_USER(2),

    /**
     * 店铺客户
     */
    SHOP_USER(3),

    /**
     * 店铺会员
     */
    SHOP_VIP(4);

    private final Integer value;

    public Integer value() {
        return value;
    }

    PopupUserTypeEnum(Integer value) {
        this.value = value;
    }

    public static Boolean isSys(Integer value) {
        return Objects.equals(value, ALL_USER.value) || Objects.equals(value, FREE_USER.value) || Objects.equals(value, PAY_USER.value);
    }

    public static Boolean isShop(Integer value) {
        return Objects.equals(value, ALL_USER.value) || Objects.equals(value, SHOP_USER.value) || Objects.equals(value, SHOP_VIP.value);
    }

    public static Boolean isSysUser(Integer value) {
        return Objects.equals(value, FREE_USER.value) || Objects.equals(value, PAY_USER.value);
    }

    public static Boolean isShopUser(Integer value) {
        return Objects.equals(value, SHOP_USER.value) || Objects.equals(value, SHOP_VIP.value);
    }

}
